import 'package:flutter/material.dart';
import 'package:fun_shop/src/app.dart';
import 'package:fun_shop/src/utils/request.dart';
import 'package:fun_shop/src/view_model/theme_model.dart';
import 'package:oktoast/oktoast.dart';
import 'package:provider/provider.dart';


void main() async {
  // 确保 Flutter 的绑定已经初始化。
  // 这在你需要在应用程序启动时执行一些依赖于 Flutter 框架的操作时非常有用
  WidgetsFlutterBinding.ensureInitialized();

  await Request.instance;

  runApp(
    MultiProvider(
      providers: [
        ChangeNotifierProvider<ThemeModel>(create: (context) => ThemeModel())
      ],
      child: const OKToast(child: FunShop()),
    )
  );
}
